package com.watson.zookeeperdemo.config;

import org.I0Itec.zkclient.exception.ZkMarshallingError;
import org.I0Itec.zkclient.serialize.ZkSerializer;

/**
 * @Description: TODO
 * @Author watson
 * @Date 2022/7/13 10:24
 * @Version 1.0
 */
public class ZkStrSerializer implements ZkSerializer {

    @Override
    public byte[] serialize(Object o) throws ZkMarshallingError {
        System.out.println("sdfsdfsdfsdfsd");
        return String.valueOf(o).getBytes();
    }

    @Override
    public Object deserialize(byte[] bytes) throws ZkMarshallingError {
        System.out.println("af对方过户杜锋但z");
        return new String(bytes);
    }
}

